sqrt
Square root
sqrt()
function returns the square root of a number.
In this example, we will return the square root of different numbers:
<?php echo ( sqrt ( 0 ) ) ; echo ( sqrt ( 1 ) ) ; echo ( sqrt ( 9 ) ) ; echo ( sqrt ( 0.64 ) ) ; echo ( sqrt ( - 9 ) ) ; ?>
Try it yourself
sqrt ( x )
parameter | describe |
---|---|
x | Required. A number. |
Returns the square root of x .